<? 
$tdest="td_subsidiotasa";
$idp=2976;

if ($id<>"") {
$SQL="SELECT * FROM $tdest WHERE idpreg=$idp AND id=$id";
$valpreg=$forms2->Execute($SQL) or DIE ("Error: $SQL");
$val=$valpreg->Fields("valor");
}?>

<table><tr><td>
<select name='AUX2976' disabled>
<option value=''>Seleccione</option><?php
$SQL="SELECT * FROM tablaopciones WHERE idopcion=212 ORDER BY valor";
$ops=$forms2->Execute($SQL) or DIE ("Error: $SQL");
$selected=false;
		while (!$ops->EOF){
		$sel="";
		if ($val==$ops->Fields("valor")) $sel="selected";
		echo "<option $sel value='".$ops->Fields("valor")."'>".$ops->Fields("texto")."</option>";
		$ops->Movenext();
		} ?>
</select>
<input type="hidden" name="P2976" value="<?=$val?>">
</td></tr>
</table>